﻿

$(document).ready(function(){ 


   	var MainArea = $('.contentBox');
    var MainAreaLeftMargin = $(MainArea).css('margin-left');
    var NoLeftMargin = "0px";
    var LeftArea = $('#sideNavBox');
    var HeaderArea = $('#header');    

	$('.ms-focusoncontent').click(function(){
        //Toggle the Left Panel to hide it
        $(LeftArea).toggle();
        $(HeaderArea).toggle();        
        $(LeftArea).is(":visible") ? MainArea.css('margin-left',MainAreaLeftMargin) :  MainArea.css('margin-left',NoLeftMargin);	
     });

});